package com.tanhua.dubbo.server.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "recommend_user")    //表示当前实体类所对应的mongoDB数据库中集合
public class RecommendUser implements Serializable {

    private static final long serialVersionUID = -4296017160071130962L;

    @Id
    private ObjectId id;    //主键id - 对应mongoDB的ObjetId
    @Indexed
    private Long userId;    //被推荐用户
    private Long toUserId;  //收到推荐的用户
    @Indexed
    private Double score;   //推荐得分
    private String date;    //日期
}

